/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2013
 */

package com.smg.community.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import javacommon.base.*;
import javacommon.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;

import com.smg.community.model.*;
import com.smg.community.dao.*;
import com.smg.community.service.*;
import com.smg.community.vo.query.*;

/**
 * @author badqiu email:badqiu(a)gmail.com
 * @version 1.0
 * @since 1.0
 */


public class SmgTopicActivityMember extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "SmgTopicActivityMember";
	public static final String ALIAS_FK_TOPIC_ID = "fkTopicId";
	public static final String ALIAS_FK_MEMBER_ID = "fkMemberId";
	public static final String ALIAS_NICK_NAME = "nickName";
	public static final String ALIAS_HEAD_IMAGE = "headImage";
	public static final String ALIAS_JOIN_DATE = "joinDate";
	public static final String ALIAS_REAL_NAME = "realName";
	public static final String ALIAS_ADDRESS = "address";
	public static final String ALIAS_SEX = "sex";
	public static final String ALIAS_EMAIL = "email";
	public static final String ALIAS_TEL = "tel";
	
	//date formats
	public static final String FORMAT_JOIN_DATE = DATE_FORMAT;
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
    /**
     * fkTopicId       db_column: fkTopicId 
     */	
	
	private java.lang.Integer fkTopicId;
    /**
     * fkMemberId       db_column: fkMemberId 
     */	
	private java.lang.Integer fkMemberId;
    /**
     * nickName       db_column: nickName 
     */	
	private java.lang.String nickName;
    /**
     * headImage       db_column: headImage 
     */	
	private java.lang.String headImage;
    /**
     * joinDate       db_column: joinDate 
     */	
	
	private java.util.Date joinDate;
    /**
     * realName       db_column: realName 
     */	
	private java.lang.String realName;
    /**
     * address       db_column: address 
     */	
	private java.lang.String address;
    /**
     * sex       db_column: sex 
     */	
	private java.lang.String sex;
    /**
     * email       db_column: email 
     */	
	private java.lang.String email;
    /**
     * tel       db_column: tel 
     */	
	private java.lang.String tel;
	//columns END

	public SmgTopicActivityMember(){
	}

	public SmgTopicActivityMember(
		java.lang.Integer fkTopicId
	){
		this.fkTopicId = fkTopicId;
	}

	public void setFkTopicId(java.lang.Integer value) {
		this.fkTopicId = value;
	}
	
	public java.lang.Integer getFkTopicId() {
		return this.fkTopicId;
	}
	public void setFkMemberId(java.lang.Integer value) {
		this.fkMemberId = value;
	}
	
	public java.lang.Integer getFkMemberId() {
		return this.fkMemberId;
	}
	public void setNickName(java.lang.String value) {
		this.nickName = value;
	}
	
	public java.lang.String getNickName() {
		return this.nickName;
	}
	public void setHeadImage(java.lang.String value) {
		this.headImage = value;
	}
	
	public java.lang.String getHeadImage() {
		return this.headImage;
	}
	public String getJoinDateString() {
		return DateConvertUtils.format(getJoinDate(), FORMAT_JOIN_DATE);
	}
	public void setJoinDateString(String value) {
		setJoinDate(DateConvertUtils.parse(value, FORMAT_JOIN_DATE,java.util.Date.class));
	}
	
	public void setJoinDate(java.util.Date value) {
		this.joinDate = value;
	}
	
	public java.util.Date getJoinDate() {
		return this.joinDate;
	}
	public void setRealName(java.lang.String value) {
		this.realName = value;
	}
	
	public java.lang.String getRealName() {
		return this.realName;
	}
	public void setAddress(java.lang.String value) {
		this.address = value;
	}
	
	public java.lang.String getAddress() {
		return this.address;
	}
	public void setSex(java.lang.String value) {
		this.sex = value;
	}
	
	public java.lang.String getSex() {
		return this.sex;
	}
	public void setEmail(java.lang.String value) {
		this.email = value;
	}
	
	public java.lang.String getEmail() {
		return this.email;
	}
	public void setTel(java.lang.String value) {
		this.tel = value;
	}
	
	public java.lang.String getTel() {
		return this.tel;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("FkTopicId",getFkTopicId())
			.append("FkMemberId",getFkMemberId())
			.append("NickName",getNickName())
			.append("HeadImage",getHeadImage())
			.append("JoinDate",getJoinDate())
			.append("RealName",getRealName())
			.append("Address",getAddress())
			.append("Sex",getSex())
			.append("Email",getEmail())
			.append("Tel",getTel())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getFkTopicId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof SmgTopicActivityMember == false) return false;
		if(this == obj) return true;
		SmgTopicActivityMember other = (SmgTopicActivityMember)obj;
		return new EqualsBuilder()
			.append(getFkTopicId(),other.getFkTopicId())
			.isEquals();
	}
}

